// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "tegra210-p2180.dtsi"
#include "tegra210-p2597.dtsi"

/ {
	model = "NVIDIA Jetson TX1 Developer Kit";
	compatible = "nvidia,p2371-2180", "nvidia,tegra210";

	pcie@1003000 {
		status = "okay";

		avdd-pll-uerefe-supply = <&avdd_1v05_pll>;
		hvddio-pex-supply = <&vdd_1v8>;
		dvddio-pex-supply = <&vdd_pex_1v05>;
		dvdd-pex-pll-supply = <&vdd_pex_1v05>;
		hvdd-pex-pll-e-supply = <&vdd_1v8>;
		vddio-pex-ctl-supply = <&vdd_1v8>;

		pci@1,0 {
			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>,
			       <&{/padctl@7009f000/pads/pcie/lanes/pcie-1}>,
			       <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>,
			       <&{/padctl@7009f000/pads/pcie/lanes/pcie-3}>;
			phy-names = "pcie-0", "pcie-1", "pcie-2", "pcie-3";
			status = "okay";
		};

		pci@2,0 {
			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>;
			phy-names = "pcie-0";
			status = "okay";
		};
	};

	host1x@50000000 {
		dsi@54300000 {
			status = "okay";

			avdd-dsi-csi-supply = <&vdd_dsi_csi>;

			panel@0 {
				compatible = "auo,b080uan01";
				reg = <0>;

				enable-gpios = <&gpio TEGRA_GPIO(V, 2)
						GPIO_ACTIVE_HIGH>;
				power-supply = <&vdd_5v0_io>;
				backlight = <&backlight>;
			};
		};
	};

	i2c@7000c400 {
		backlight: backlight@2c {
			compatible = "ti,lp8557";
			reg = <0x2c>;

			dev-ctrl = /bits/ 8 <0x80>;
			init-brt = /bits/ 8 <0xff>;

			pwm-period = <29334>;

			pwms = <&pwm 0 29334>;
			pwm-names = "lp8557";

			/* 3 LED string */
			rom_14h {
				rom-addr = /bits/ 8 <0x14>;
				rom-val = /bits/ 8 <0x87>;
			};

			/* boost frequency 1 MHz */
			rom_13h {
				rom-addr = /bits/ 8 <0x13>;
				rom-val = /bits/ 8 <0x01>;
			};
		};
	};

	i2c@7000c500 {
		/* carrier board ID EEPROM */
		eeprom@57 {
			compatible = "atmel,24c02";
			reg = <0x57>;

			address-bits = <8>;
			page-size = <8>;
			size = <256>;
			read-only;
		};
	};

	clock@70110000 {
		status = "okay";

		nvidia,cf = <6>;
		nvidia,ci = <0>;
		nvidia,cg = <2>;
		nvidia,droop-ctrl = <0x00000f00>;
		nvidia,force-mode = <1>;
		nvidia,sample-rate = <25000>;

		nvidia,pwm-min-microvolts = <708000>;
		nvidia,pwm-period-nanoseconds = <2500>; /* 2.5us */
		nvidia,pwm-to-pmic;
		nvidia,pwm-tristate-microvolts = <1000000>;
		nvidia,pwm-voltage-step-microvolts = <19200>;

		pinctrl-names = "dvfs_pwm_enable", "dvfs_pwm_disable";
		pinctrl-0 = <&dvfs_pwm_active_state>;
		pinctrl-1 = <&dvfs_pwm_inactive_state>;
	};

	aconnect@702c0000 {
		status = "okay";

		dma@702e2000 {
			status = "okay";
		};

		agic@702f9000 {
			status = "okay";
		};
	};
};
